Optimal. Leaf size=42 \[ -\frac{a \tanh ^{-1}(\sin (e+f x))}{c f}-\frac{2 a \tan (e+f x)}{f (c-c \sec (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0536762, antiderivative size = 42, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.067, Rules used = {3957, 3770} \[ -\frac{a \tanh ^{-1}(\sin (e+f x))}{c f}-\frac{2 a \tan (e+f x)}{f (c-c \sec (e+f x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3957
Rule 3770
Rubi steps
\begin{align*} \int \frac{\sec (e+f x) (a+a \sec (e+f x))}{c-c \sec (e+f x)} \, dx &=-\frac{2 a \tan (e+f x)}{f (c-c \sec (e+f x))}-\frac{a \int \sec (e+f x) \, dx}{c}\\ &=-\frac{a \tanh ^{-1}(\sin (e+f x))}{c f}-\frac{2 a \tan (e+f x)}{f (c-c \sec (e+f x))}\\ \end{align*}
Mathematica [A] time = 0.0672002, size = 77, normalized size = 1.83 \[ -\frac{a \left (-\frac{2 \cot \left (\frac{1}{2} (e+f x)\right )}{f}-\frac{\log \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right )}{f}+\frac{\log \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )}{f}\right )}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.063, size = 63, normalized size = 1.5 \begin{align*} -{\frac{a}{fc}\ln \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) }+{\frac{a}{fc}\ln \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) -1 \right ) }+2\,{\frac{a}{fc\tan \left ( 1/2\,fx+e/2 \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 0.995552, size = 136, normalized size = 3.24 \begin{align*} -\frac{a{\left (\frac{\log \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{c} - \frac{\log \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{c} - \frac{\cos \left (f x + e\right ) + 1}{c \sin \left (f x + e\right )}\right )} - \frac{a{\left (\cos \left (f x + e\right ) + 1\right )}}{c \sin \left (f x + e\right )}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.471912, size = 174, normalized size = 4.14 \begin{align*} -\frac{a \log \left (\sin \left (f x + e\right ) + 1\right ) \sin \left (f x + e\right ) - a \log \left (-\sin \left (f x + e\right ) + 1\right ) \sin \left (f x + e\right ) - 4 \, a \cos \left (f x + e\right ) - 4 \, a}{2 \, c f \sin \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - \frac{a \left (\int \frac{\sec{\left (e + f x \right )}}{\sec{\left (e + f x \right )} - 1}\, dx + \int \frac{\sec ^{2}{\left (e + f x \right )}}{\sec{\left (e + f x \right )} - 1}\, dx\right )}{c} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.38624, size = 85, normalized size = 2.02 \begin{align*} -\frac{\frac{a \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1 \right |}\right )}{c} - \frac{a \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1 \right |}\right )}{c} - \frac{2 \, a}{c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]